package com.system.common.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.system.common.bean.SeckillOrders;

import java.util.List;

public interface ISeckillOrdersService {

    SeckillOrders getById(Integer id);

    SeckillOrders getByUserIdAndActivityIdAndGoodsId(Integer userid, Integer activityid, Integer goodsid);

    void addSeckillOrder(SeckillOrders seckillOrder);

    void updateSeckillOrder(SeckillOrders seckillOrder);

    void deleteSeckillOrder(Integer id);

    void updateStatus(Integer id, Integer status); // 可选，针对秒杀订单状态

    List<SeckillOrders> getAll();

    IPage<SeckillOrders> getPage(SeckillOrders seckillOrder, Page<SeckillOrders> page);

    List<SeckillOrders> getByUserId(Integer userid);

    List<SeckillOrders> getByActivityId(Integer activityid);

    SeckillOrders getByOrderNo(String orderNo);
}
